package com.huowenjie.entity;


import lombok.Data;

import javax.persistence.*;

@Table(name = "jpa_dept")
@Entity
@Data
public class Dept {
    @Column(name = "id")
    @Id
    private Long id;

    @Column(name = "dname")
    private String dname;

    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "userid",referencedColumnName = "id",insertable = false,updatable = false)
    private User user;
}
